package Spring5.第二章.demo2_5_代理模式.静态代理.demo01;

public class Father {
    private Son son;
     public Father(Son son) {
         this.son = son;
     }

     // 获取目标对象的引用
    public void findLove(){
        System.out.println("父亲物色对象");
        this.son.findLove();
        System.out.println("双方同意交往");
    }

    public static void main(String[] args) {
        // 只能帮儿子找对象，不能帮别人
        Father father = new Father(new Son());
        father.findLove();
    }
}
